package com.annotation.config;

import com.annotation.entities.Car;
import com.annotation.entities.Cat;
import com.annotation.entities.Dog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@ComponentScan(value = "com.annotation.lifeCycle")
@Import({Cat.class,Dog.class})
@Configuration
public class MainConfig_LifeCycle {

//    @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    @Bean(initMethod = "init",destroyMethod = "destory")
    public Car car(){
        return new Car();
    }

}
